﻿# CMakeList.txt : Top-level CMake project file, do global configuration
# and include sub-projects here.
#
cmake_minimum_required (VERSION 3.8)

# 设置默认的生成器
#set(CMAKE_GENERATOR "Visual Studio 16 2019")

# 设置工具集为 VC141
#set(CMAKE_GENERATOR_TOOLSET "v141" CACHE STRING "Toolset version" FORCE)

#设置C语言标准
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_definitions(-D_CRT_SECURE_NO_WARNINGS)

set(QT_VERSION_MAJOR 5)

project (prolab)

#定义全局变量(!!!!!!!!!!!!!!!改成自己电脑的库地址)
set(QT_PREFIX_PATH "C:/projectFiles/Qt_msvc2019_64/msvc2019_64")
set(MATLAB_PREFIX_PATH "C:/projectFiles/extern")

set(THIRDPARTY_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)
#链接OSG静态库
set(OSG_PREFIX_PATH ${THIRDPARTY_PATH}/osg)
set(LIBIGL_PREFIX_PATH ${THIRDPARTY_PATH}/libigl)
set(PCL_PREFIX_PATH ${THIRDPARTY_PATH}/PCL)
set(EIGEN_PREFIX_PATH ${THIRDPARTY_PATH}/eigen3)
set(PROLAB_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/out)
set(BIN_NEED_PATH ${THIRDPARTY_PATH}/bin_need)
set(GEPMLIB_PATH ${THIRDPARTY_PATH}/geomLIB)
set(NLOPT_PATH ${THIRDPARTY_PATH}/nlopt-2.7.1)
set(CGAL_PATH ${THIRDPARTY_PATH}/CGAL/dev/CGAL-4.14.3/)


#设置头文件！！！！！！（影响范围最大，可以为CMakelists.txt后的所有子目录的项目添加头文件目录）
#这个命令一般用在父目录，用于设置全局变量
#（以msvc为例，.h,.cpp不会在sln文件资源浏览器窗格展示，仅仅作为头文件被包含）
#这里暂时先这样，处于可以用的状态，之后需要将include_directories统一处理为target_include_directories
include_directories(
    ${QT_PREFIX_PATH}/include
    ${MATLAB_PREFIX_PATH}/include
    ${OSG_PREFIX_PATH}/include
    ${LIBIGL_PREFIX_PATH}/libigl-src
    ${EIGEN_PREFIX_PATH}
    ${PCL_PREFIX_PATH}/include
    ${GEPMLIB_PATH}
    ${NLOPT_PATH}/bin
    ${NLOPT_PATH}/src/api
    ${CGAL_PATH}/auxiliary/gmp/include
)

add_subdirectory(prolab)